<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
    <title>PHPXRef 0.7.1 : Tomato Project : /core/v0.1/z/cache.class.php source</title>
    <link rel="stylesheet" href="../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../sample-print.css" type="text/css" media="print">
    <style id="hilight" type="text/css"></style>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
	<tr>
        <td valign="top" class="pagetitle">
            [ <a href="../../../index.html">Index</a> ] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_classes/index.html">Classes</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_functions/index.html">Functions</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_variables/index.html">Variables</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_constants/index.html">Constants</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_tables/index.html">Tables</a>]
        </td>
        <td align="right" class="pagetitle">
		    <h2 style="margin-bottom: 0px">PHP Cross Reference of Tomato Project</h2>
	    </td>
    </tr>
</table>


<!-- Generated by PHPXref 0.7.1 at Thu Sep 10 15:54:52 2020 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->

<script src="../../../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../../../';
subdir='core/v0.1/z';
filename='cache.class.php.source.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);

// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
  document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
  document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../../../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
<script language="JavaScript" type="text/javascript">
<!--

document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');

document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../../../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../../../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h2 class="listing-heading"><a href="./index.html">/core/v0.1/z/</a> -> <a href="cache.class.php.html">cache.class.php</a> (source)</h2>
<div class="listing">
<p class="viewlinks">[<a href="cache.class.php.html">Summary view</a>]
[<a href="javascript:window.print();">Print</a>]
[<a href="cache.class.php.source.txt" target="_new">Text view</a>]
</p>
<pre>
<a name="l1"><span class="linenum">   1</span></a>  &lt;?php
<a name="l2"><span class="linenum">   2</span></a>  namespace z;
<a name="l3"><span class="linenum">   3</span></a>  
<a name="l4"><span class="linenum">   4</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('cache')" href="../../../_classes/cache.html" onMouseOver="classPopup(event,'cache')">cache</a>
<a name="l5"><span class="linenum">   5</span></a>  {
<a name="l6"><span class="linenum">   6</span></a>      const LOCK_EXPIRE = 30; <span class="comment">// 获取缓存锁的超时时间(秒)</span>
<a name="l7"><span class="linenum">   7</span></a>      const LOCK_SLEEP = 1000; <span class="comment">// 获取缓存锁的重试间隔(微秒)</span>
<a name="l8"><span class="linenum">   8</span></a>      const LOCK_KEY_PREFIX = 'z-php-lock:'; <span class="comment">// 缓存锁的键名前缀</span>
<a name="l9"><span class="linenum">   9</span></a>      private static <a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>, <a class="var it232" onMouseOver="hilite(232)" onMouseOut="lolite()" onClick="logVariable('Z_MEMCACHED')" href="../../../_variables/Z_MEMCACHED.html">$Z_MEMCACHED</a>;
<a name="l10"><span class="linenum">  10</span></a>      public static function <a class="function" onClick="logFunction('Redis')" href="../../../_functions/redis.html" onMouseOver="funcPopup(event,'redis')">Redis</a>(array <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> = null, bool <a class="var it201" onMouseOver="hilite(201)" onMouseOut="lolite()" onClick="logVariable('new')" href="../../../_variables/new.html">$new</a> = false)
<a name="l11"><span class="linenum">  11</span></a>      {
<a name="l12"><span class="linenum">  12</span></a>          <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> || <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> = <a class="var it194" onMouseOver="hilite(194)" onMouseOut="lolite()" onClick="logVariable('GLOBALS')" href="../../../_variables/GLOBALS.html">$GLOBALS</a>['ZPHP_CONFIG']['REDIS'] ?? null;
<a name="l13"><span class="linenum">  13</span></a>          if (!<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>) {
<a name="l14"><span class="linenum">  14</span></a>              throw new \Exception(&quot;没有配置redis连接参数&quot;);
<a name="l15"><span class="linenum">  15</span></a>          }
<a name="l16"><span class="linenum">  16</span></a>  
<a name="l17"><span class="linenum">  17</span></a>          if (<a class="var it201" onMouseOver="hilite(201)" onMouseOut="lolite()" onClick="logVariable('new')" href="../../../_variables/new.html">$new</a>) {
<a name="l18"><span class="linenum">  18</span></a>              <a class="var it201" onMouseOver="hilite(201)" onMouseOut="lolite()" onClick="logVariable('new')" href="../../../_variables/new.html">$new</a> = new \<a class="function" onClick="logFunction('Redis')" href="../../../_functions/redis.html" onMouseOver="funcPopup(event,'redis')">Redis</a>();
<a name="l19"><span class="linenum">  19</span></a>              <a class="var it201" onMouseOver="hilite(201)" onMouseOut="lolite()" onClick="logVariable('new')" href="../../../_variables/new.html">$new</a>-&gt;connect(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['host'], <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['port'], <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['timeout'] ?? 1);
<a name="l20"><span class="linenum">  20</span></a>              return <a class="var it201" onMouseOver="hilite(201)" onMouseOut="lolite()" onClick="logVariable('new')" href="../../../_variables/new.html">$new</a>;
<a name="l21"><span class="linenum">  21</span></a>          }
<a name="l22"><span class="linenum">  22</span></a>          <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a> = &quot;{<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['host']}:{<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['port']}&quot;;
<a name="l23"><span class="linenum">  23</span></a>          if (!isset(self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>])) {
<a name="l24"><span class="linenum">  24</span></a>              self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>] = new \<a class="function" onClick="logFunction('Redis')" href="../../../_functions/redis.html" onMouseOver="funcPopup(event,'redis')">Redis</a>();
<a name="l25"><span class="linenum">  25</span></a>              self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>]-&gt;connect(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['host'], <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['port'], <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['timeout'] ?? 1);
<a name="l26"><span class="linenum">  26</span></a>              empty(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['pass']) || self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>]-&gt;auth(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['pass']);
<a name="l27"><span class="linenum">  27</span></a>              empty(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['database']) || self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>]-&gt;<a class="function" onClick="logFunction('select')" href="../../../_functions/select.html" onMouseOver="funcPopup(event,'select')">select</a>(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>['database']);
<a name="l28"><span class="linenum">  28</span></a>          }
<a name="l29"><span class="linenum">  29</span></a>          return self::<a class="var it231" onMouseOver="hilite(231)" onMouseOut="lolite()" onClick="logVariable('Z_REDIS')" href="../../../_variables/Z_REDIS.html">$Z_REDIS</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>];
<a name="l30"><span class="linenum">  30</span></a>      }
<a name="l31"><span class="linenum">  31</span></a>      public static function <a class="function" onClick="logFunction('Memcached')" href="../../../_functions/memcached.html" onMouseOver="funcPopup(event,'memcached')">Memcached</a>(array <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> = null)
<a name="l32"><span class="linenum">  32</span></a>      {
<a name="l33"><span class="linenum">  33</span></a>          <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> || <a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a> = <a class="var it194" onMouseOver="hilite(194)" onMouseOut="lolite()" onClick="logVariable('GLOBALS')" href="../../../_variables/GLOBALS.html">$GLOBALS</a>['ZPHP_CONFIG']['MEMCACHED'] ?? null;
<a name="l34"><span class="linenum">  34</span></a>          if (!<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>) {
<a name="l35"><span class="linenum">  35</span></a>              throw new \Exception(&quot;没有配置memcached连接参数&quot;);
<a name="l36"><span class="linenum">  36</span></a>          }
<a name="l37"><span class="linenum">  37</span></a>  
<a name="l38"><span class="linenum">  38</span></a>          <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a> = md5(<a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>));
<a name="l39"><span class="linenum">  39</span></a>          if (!isset(self::<a class="var it232" onMouseOver="hilite(232)" onMouseOut="lolite()" onClick="logVariable('Z_MEMCACHED')" href="../../../_variables/Z_MEMCACHED.html">$Z_MEMCACHED</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>])) {
<a name="l40"><span class="linenum">  40</span></a>              self::<a class="var it232" onMouseOver="hilite(232)" onMouseOut="lolite()" onClick="logVariable('Z_MEMCACHED')" href="../../../_variables/Z_MEMCACHED.html">$Z_MEMCACHED</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>] = new \<a class="function" onClick="logFunction('Memcached')" href="../../../_functions/memcached.html" onMouseOver="funcPopup(event,'memcached')">Memcached</a>();
<a name="l41"><span class="linenum">  41</span></a>              self::<a class="var it232" onMouseOver="hilite(232)" onMouseOut="lolite()" onClick="logVariable('Z_MEMCACHED')" href="../../../_variables/Z_MEMCACHED.html">$Z_MEMCACHED</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>]-&gt;addServers(<a class="var it72" onMouseOver="hilite(72)" onMouseOut="lolite()" onClick="logVariable('c')" href="../../../_variables/c.html">$c</a>);
<a name="l42"><span class="linenum">  42</span></a>          }
<a name="l43"><span class="linenum">  43</span></a>          return self::<a class="var it232" onMouseOver="hilite(232)" onMouseOut="lolite()" onClick="logVariable('Z_MEMCACHED')" href="../../../_variables/Z_MEMCACHED.html">$Z_MEMCACHED</a>[<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>];
<a name="l44"><span class="linenum">  44</span></a>      }
<a name="l45"><span class="linenum">  45</span></a>  
<a name="l46"><span class="linenum">  46</span></a>      <span class="comment">/**</span>
<a name="l47"><span class="linenum">  47</span></a>  <span class="comment">     * redis锁</span>
<a name="l48"><span class="linenum">  48</span></a>  <span class="comment">     * @param redis redis 连接实例</span>
<a name="l49"><span class="linenum">  49</span></a>  <span class="comment">     * @param key 键名</span>
<a name="l50"><span class="linenum">  50</span></a>  <span class="comment">     * @param expire 获取锁的超时时间（秒）</span>
<a name="l51"><span class="linenum">  51</span></a>  <span class="comment">     * @return 成功返回锁的键名，否则返回false</span>
<a name="l52"><span class="linenum">  52</span></a>  <span class="comment">     */</span>
<a name="l53"><span class="linenum">  53</span></a>      public static function <a class="function" onClick="logFunction('Rlock')" href="../../../_functions/rlock.html" onMouseOver="funcPopup(event,'rlock')">Rlock</a>(<a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>, string <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, int <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = 0)
<a name="l54"><span class="linenum">  54</span></a>      {
<a name="l55"><span class="linenum">  55</span></a>          <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> = self::LOCK_KEY_PREFIX . <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>;
<a name="l56"><span class="linenum">  56</span></a>          if (<a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) {
<a name="l57"><span class="linenum">  57</span></a>              if (!<a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, ['nx', 'ex' =&gt; <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>])) {
<a name="l58"><span class="linenum">  58</span></a>                  <a class="var it234" onMouseOver="hilite(234)" onMouseOut="lolite()" onClick="logVariable('try')" href="../../../_variables/try.html">$try</a> = (int) <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> * 1000000 / self::LOCK_SLEEP - 1;
<a name="l59"><span class="linenum">  59</span></a>                  do {
<a name="l60"><span class="linenum">  60</span></a>                      <a class="phpfunction" onClick="logFunction('usleep')" href="../../../_functions/usleep.html" onMouseOver="phpfuncPopup(event,'usleep')">usleep</a>(self::LOCK_SLEEP);
<a name="l61"><span class="linenum">  61</span></a>                      <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, ['nx', 'ex' =&gt; <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>]);
<a name="l62"><span class="linenum">  62</span></a>                  } while (!<a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> &amp;&amp; --<a class="var it234" onMouseOver="hilite(234)" onMouseOut="lolite()" onClick="logVariable('try')" href="../../../_variables/try.html">$try</a>);
<a name="l63"><span class="linenum">  63</span></a>              }
<a name="l64"><span class="linenum">  64</span></a>          } else {
<a name="l65"><span class="linenum">  65</span></a>              <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, ['nx', 'ex' =&gt; self::LOCK_EXPIRE]);
<a name="l66"><span class="linenum">  66</span></a>          }
<a name="l67"><span class="linenum">  67</span></a>          return <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> : false;
<a name="l68"><span class="linenum">  68</span></a>      }
<a name="l69"><span class="linenum">  69</span></a>  
<a name="l70"><span class="linenum">  70</span></a>      <span class="comment">/**</span>
<a name="l71"><span class="linenum">  71</span></a>  <span class="comment">     * memcached锁</span>
<a name="l72"><span class="linenum">  72</span></a>  <span class="comment">     * @param mem memcached 连接实例</span>
<a name="l73"><span class="linenum">  73</span></a>  <span class="comment">     * @param key 键名</span>
<a name="l74"><span class="linenum">  74</span></a>  <span class="comment">     * @param expire 获取锁的超时时间（秒）</span>
<a name="l75"><span class="linenum">  75</span></a>  <span class="comment">     * @return 成功返回锁的键名，否则返回false</span>
<a name="l76"><span class="linenum">  76</span></a>  <span class="comment">     */</span>
<a name="l77"><span class="linenum">  77</span></a>      public static function <a class="function" onClick="logFunction('Mlock')" href="../../../_functions/mlock.html" onMouseOver="funcPopup(event,'mlock')">Mlock</a>(<a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>, string <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, int <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = 0)
<a name="l78"><span class="linenum">  78</span></a>      {
<a name="l79"><span class="linenum">  79</span></a>          <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> = self::LOCK_KEY_PREFIX . <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>;
<a name="l80"><span class="linenum">  80</span></a>          if (<a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) {
<a name="l81"><span class="linenum">  81</span></a>              if (!<a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('add')" href="../../../_functions/add.html" onMouseOver="funcPopup(event,'add')">add</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>)) {
<a name="l82"><span class="linenum">  82</span></a>                  <a class="var it234" onMouseOver="hilite(234)" onMouseOut="lolite()" onClick="logVariable('try')" href="../../../_variables/try.html">$try</a> = (int) <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> * 1000000 / self::LOCK_SLEEP - 1;
<a name="l83"><span class="linenum">  83</span></a>                  do {
<a name="l84"><span class="linenum">  84</span></a>                      <a class="phpfunction" onClick="logFunction('usleep')" href="../../../_functions/usleep.html" onMouseOver="phpfuncPopup(event,'usleep')">usleep</a>(self::LOCK_SLEEP);
<a name="l85"><span class="linenum">  85</span></a>                      <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('add')" href="../../../_functions/add.html" onMouseOver="funcPopup(event,'add')">add</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>);
<a name="l86"><span class="linenum">  86</span></a>                  } while (!<a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> &amp;&amp; --<a class="var it234" onMouseOver="hilite(234)" onMouseOut="lolite()" onClick="logVariable('try')" href="../../../_variables/try.html">$try</a>);
<a name="l87"><span class="linenum">  87</span></a>              }
<a name="l88"><span class="linenum">  88</span></a>          } else {
<a name="l89"><span class="linenum">  89</span></a>              <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('add')" href="../../../_functions/add.html" onMouseOver="funcPopup(event,'add')">add</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, self::LOCK_EXPIRE);
<a name="l90"><span class="linenum">  90</span></a>          }
<a name="l91"><span class="linenum">  91</span></a>          return <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> : false;
<a name="l92"><span class="linenum">  92</span></a>      }
<a name="l93"><span class="linenum">  93</span></a>  
<a name="l94"><span class="linenum">  94</span></a>      <span class="comment">/**</span>
<a name="l95"><span class="linenum">  95</span></a>  <span class="comment">     * Redis缓存操作</span>
<a name="l96"><span class="linenum">  96</span></a>  <span class="comment">     * @param key 缓存 key</span>
<a name="l97"><span class="linenum">  97</span></a>  <span class="comment">     * @param data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用</span>
<a name="l98"><span class="linenum">  98</span></a>  <span class="comment">     * @param expire 缓存时间：为假时表示不超时</span>
<a name="l99"><span class="linenum">  99</span></a>  <span class="comment">     * @param lock 并发锁</span>
<a name="l100"><span class="linenum"> 100</span></a>  <span class="comment">     * @return 读取或写入的数据</span>
<a name="l101"><span class="linenum"> 101</span></a>  <span class="comment">     */</span>
<a name="l102"><span class="linenum"> 102</span></a>      public static function <a class="function" onClick="logFunction('R')" href="../../../_functions/r.html" onMouseOver="funcPopup(event,'r')">R</a>(string <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = null, int <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = null, int <a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a> = 0)
<a name="l103"><span class="linenum"> 103</span></a>      {
<a name="l104"><span class="linenum"> 104</span></a>          <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a> = self::<a class="function" onClick="logFunction('Redis')" href="../../../_functions/redis.html" onMouseOver="funcPopup(event,'redis')">Redis</a>();
<a name="l105"><span class="linenum"> 105</span></a>          isset(<a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) || <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = <a class="var it194" onMouseOver="hilite(194)" onMouseOut="lolite()" onClick="logVariable('GLOBALS')" href="../../../_variables/GLOBALS.html">$GLOBALS</a>['ZPHP_CONFIG']['REDIS']['expire'] ?? 600;
<a name="l106"><span class="linenum"> 106</span></a>          if (null === <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) {
<a name="l107"><span class="linenum"> 107</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;get(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>);
<a name="l108"><span class="linenum"> 108</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> &amp;&amp; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>);
<a name="l109"><span class="linenum"> 109</span></a>          } elseif (<a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a>) {
<a name="l110"><span class="linenum"> 110</span></a>              <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> = self::LOCK_KEY_PREFIX . <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>;
<a name="l111"><span class="linenum"> 111</span></a>              if (<a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, ['nx', 'ex' =&gt; self::LOCK_EXPIRE])) {
<a name="l112"><span class="linenum"> 112</span></a>                  <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>() ?: '';
<a name="l113"><span class="linenum"> 113</span></a>                  <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> ? <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;setex(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>)) : <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>));
<a name="l114"><span class="linenum"> 114</span></a>                  <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;del(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>);
<a name="l115"><span class="linenum"> 115</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> : false;
<a name="l116"><span class="linenum"> 116</span></a>              } else {
<a name="l117"><span class="linenum"> 117</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;get(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>);
<a name="l118"><span class="linenum"> 118</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> &amp;&amp; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>);
<a name="l119"><span class="linenum"> 119</span></a>              }
<a name="l120"><span class="linenum"> 120</span></a>          } else {
<a name="l121"><span class="linenum"> 121</span></a>              <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>() ?: '';
<a name="l122"><span class="linenum"> 122</span></a>              <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> ? <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;setex(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>)) : <a class="var it220" onMouseOver="hilite(220)" onMouseOut="lolite()" onClick="logVariable('redis')" href="../../../_variables/redis.html">$redis</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>));
<a name="l123"><span class="linenum"> 123</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> : false;
<a name="l124"><span class="linenum"> 124</span></a>          }
<a name="l125"><span class="linenum"> 125</span></a>          return <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>;
<a name="l126"><span class="linenum"> 126</span></a>      }
<a name="l127"><span class="linenum"> 127</span></a>  
<a name="l128"><span class="linenum"> 128</span></a>      <span class="comment">/**</span>
<a name="l129"><span class="linenum"> 129</span></a>  <span class="comment">     * Memcached缓存操作</span>
<a name="l130"><span class="linenum"> 130</span></a>  <span class="comment">     * @param key 缓存 key</span>
<a name="l131"><span class="linenum"> 131</span></a>  <span class="comment">     * @param data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用</span>
<a name="l132"><span class="linenum"> 132</span></a>  <span class="comment">     * @param expire 缓存时间：为假时表示不超时</span>
<a name="l133"><span class="linenum"> 133</span></a>  <span class="comment">     * @param lock 并发锁</span>
<a name="l134"><span class="linenum"> 134</span></a>  <span class="comment">     * @return 读取或写入的数据</span>
<a name="l135"><span class="linenum"> 135</span></a>  <span class="comment">     */</span>
<a name="l136"><span class="linenum"> 136</span></a>      public static function <a class="function" onClick="logFunction('M')" href="../../../_functions/m.html" onMouseOver="funcPopup(event,'m')">M</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = null, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = null, <a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a> = 0)
<a name="l137"><span class="linenum"> 137</span></a>      {
<a name="l138"><span class="linenum"> 138</span></a>          <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a> = self::<a class="function" onClick="logFunction('Memcached')" href="../../../_functions/memcached.html" onMouseOver="funcPopup(event,'memcached')">Memcached</a>();
<a name="l139"><span class="linenum"> 139</span></a>          isset(<a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) || <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = <a class="var it194" onMouseOver="hilite(194)" onMouseOut="lolite()" onClick="logVariable('GLOBALS')" href="../../../_variables/GLOBALS.html">$GLOBALS</a>['ZPHP_CONFIG']['MEMCACHED']['expire'] ?? 600;
<a name="l140"><span class="linenum"> 140</span></a>          if (null === <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) {
<a name="l141"><span class="linenum"> 141</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;get(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>);
<a name="l142"><span class="linenum"> 142</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> &amp;&amp; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>);
<a name="l143"><span class="linenum"> 143</span></a>          } elseif (<a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a>) {
<a name="l144"><span class="linenum"> 144</span></a>              <a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a> = self::LOCK_KEY_PREFIX . <a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>;
<a name="l145"><span class="linenum"> 145</span></a>              if (<a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('add')" href="../../../_functions/add.html" onMouseOver="funcPopup(event,'add')">add</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>, 1, self::LOCK_EXPIRE)) {
<a name="l146"><span class="linenum"> 146</span></a>                  <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>() ?: '';
<a name="l147"><span class="linenum"> 147</span></a>                  <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> ? <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>), <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) : <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>));
<a name="l148"><span class="linenum"> 148</span></a>                  <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('delete')" href="../../../_functions/delete.html" onMouseOver="funcPopup(event,'delete')">delete</a>(<a class="var it233" onMouseOver="hilite(233)" onMouseOut="lolite()" onClick="logVariable('lock_key')" href="../../../_variables/lock_key.html">$lock_key</a>);
<a name="l149"><span class="linenum"> 149</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> : false;
<a name="l150"><span class="linenum"> 150</span></a>              } else {
<a name="l151"><span class="linenum"> 151</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;get(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>);
<a name="l152"><span class="linenum"> 152</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> &amp;&amp; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>);
<a name="l153"><span class="linenum"> 153</span></a>              }
<a name="l154"><span class="linenum"> 154</span></a>          } else {
<a name="l155"><span class="linenum"> 155</span></a>              <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>() ?: '';
<a name="l156"><span class="linenum"> 156</span></a>              <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> = <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> ? <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>), <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) : <a class="var it221" onMouseOver="hilite(221)" onMouseOut="lolite()" onClick="logVariable('mem')" href="../../../_variables/mem.html">$mem</a>-&gt;<a class="function" onClick="logFunction('set')" href="../../../_functions/set.html" onMouseOver="funcPopup(event,'set')">set</a>(<a class="var it26" onMouseOver="hilite(26)" onMouseOut="lolite()" onClick="logVariable('key')" href="../../../_variables/key.html">$key</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>));
<a name="l157"><span class="linenum"> 157</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it156" onMouseOver="hilite(156)" onMouseOut="lolite()" onClick="logVariable('r')" href="../../../_variables/r.html">$r</a> ? <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> : false;
<a name="l158"><span class="linenum"> 158</span></a>          }
<a name="l159"><span class="linenum"> 159</span></a>          return <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>;
<a name="l160"><span class="linenum"> 160</span></a>      }
<a name="l161"><span class="linenum"> 161</span></a>  
<a name="l162"><span class="linenum"> 162</span></a>      <span class="comment">/**</span>
<a name="l163"><span class="linenum"> 163</span></a>  <span class="comment">     * 文件缓存操作</span>
<a name="l164"><span class="linenum"> 164</span></a>  <span class="comment">     * @param file 文件路径</span>
<a name="l165"><span class="linenum"> 165</span></a>  <span class="comment">     * @param data 待写入的数据：为 null 时表示读取缓存，可以是一个回调函数，只在需要写入时调用</span>
<a name="l166"><span class="linenum"> 166</span></a>  <span class="comment">     * @param expire 缓存时间：为假时表示不超时</span>
<a name="l167"><span class="linenum"> 167</span></a>  <span class="comment">     * @param lock 并发锁</span>
<a name="l168"><span class="linenum"> 168</span></a>  <span class="comment">     * @return 读取或写入的数据</span>
<a name="l169"><span class="linenum"> 169</span></a>  <span class="comment">     */</span>
<a name="l170"><span class="linenum"> 170</span></a>      public static function <a class="function" onClick="logFunction('F')" href="../../../_functions/f.html" onMouseOver="funcPopup(event,'f')">F</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = null, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> = 0, <a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a> = 0)
<a name="l171"><span class="linenum"> 171</span></a>      {
<a name="l172"><span class="linenum"> 172</span></a>          <a class="function" onClick="logFunction('IsFullPath')" href="../../../_functions/isfullpath.html" onMouseOver="funcPopup(event,'isfullpath')">IsFullPath</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>) || <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a> = <a class="constant" onClick="logConstant('P_CACHE_')" href="../../../_constants/P_CACHE_.html" onMouseOver="constPopup(event,'P_CACHE_')">P_CACHE_</a> . <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>;
<a name="l173"><span class="linenum"> 173</span></a>          if (null === <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) {
<a name="l174"><span class="linenum"> 174</span></a>              if (<a class="phpfunction" onClick="logFunction('is_file')" href="../../../_functions/is_file.html" onMouseOver="phpfuncPopup(event,'is_file')">is_file</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>) &amp;&amp; false !== (<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('str')" href="../../../_variables/str.html">$str</a> = <a class="function" onClick="logFunction('ReadFileSH')" href="../../../_functions/readfilesh.html" onMouseOver="funcPopup(event,'readfilesh')">ReadFileSH</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>))) {
<a name="l175"><span class="linenum"> 175</span></a>                  <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('str')" href="../../../_variables/str.html">$str</a>);
<a name="l176"><span class="linenum"> 176</span></a>                  if (isset(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>['Z-PHP-CACHE-<a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a>-OUT'])) {
<a name="l177"><span class="linenum"> 177</span></a>                      if (<a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a> &lt; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>['Z-PHP-CACHE-<a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a>-OUT']) {
<a name="l178"><span class="linenum"> 178</span></a>                          <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>['Z-PHP-CACHE-TDATA'];
<a name="l179"><span class="linenum"> 179</span></a>                      } else {
<a name="l180"><span class="linenum"> 180</span></a>                          <a class="phpfunction" onClick="logFunction('unlink')" href="../../../_functions/unlink.html" onMouseOver="phpfuncPopup(event,'unlink')">unlink</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l181"><span class="linenum"> 181</span></a>                          <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = false;
<a name="l182"><span class="linenum"> 182</span></a>                      }
<a name="l183"><span class="linenum"> 183</span></a>                  }
<a name="l184"><span class="linenum"> 184</span></a>              }
<a name="l185"><span class="linenum"> 185</span></a>          } elseif (<a class="var it92" onMouseOver="hilite(92)" onMouseOut="lolite()" onClick="logVariable('lock')" href="../../../_variables/lock.html">$lock</a>) {
<a name="l186"><span class="linenum"> 186</span></a>              <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = function () use (<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>) {
<a name="l187"><span class="linenum"> 187</span></a>                  <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>();
<a name="l188"><span class="linenum"> 188</span></a>                  return [
<a name="l189"><span class="linenum"> 189</span></a>                      'Z-PHP-CACHE-TDATA' =&gt; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>,
<a name="l190"><span class="linenum"> 190</span></a>                      'Z-PHP-CACHE-<a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a>-OUT' =&gt; <a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a> + <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>,
<a name="l191"><span class="linenum"> 191</span></a>                  ];
<a name="l192"><span class="linenum"> 192</span></a>              };
<a name="l193"><span class="linenum"> 193</span></a>              <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = self::<a class="function" onClick="logFunction('SetFileCache')" href="../../../_functions/setfilecache.html" onMouseOver="funcPopup(event,'setfilecache')">SetFileCache</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>);
<a name="l194"><span class="linenum"> 194</span></a>              isset(<a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>['Z-PHP-CACHE-TDATA']) &amp;&amp; <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a>['Z-PHP-CACHE-TDATA'];
<a name="l195"><span class="linenum"> 195</span></a>          } else {
<a name="l196"><span class="linenum"> 196</span></a>              <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>();
<a name="l197"><span class="linenum"> 197</span></a>              <a class="var it235" onMouseOver="hilite(235)" onMouseOut="lolite()" onClick="logVariable('DATA')" href="../../../_variables/DATA.html">$DATA</a> = <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a> ? ['Z-PHP-CACHE-TDATA' =&gt; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, 'Z-PHP-CACHE-<a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a>-OUT' =&gt; <a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a> + <a class="var it82" onMouseOver="hilite(82)" onMouseOut="lolite()" onClick="logVariable('expire')" href="../../../_variables/expire.html">$expire</a>] : <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>;
<a name="l198"><span class="linenum"> 198</span></a>              false === <a class="phpfunction" onClick="logFunction('file_put_contents')" href="../../../_functions/file_put_contents.html" onMouseOver="phpfuncPopup(event,'file_put_contents')">file_put_contents</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>), LOCK_EX) || <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>;
<a name="l199"><span class="linenum"> 199</span></a>          }
<a name="l200"><span class="linenum"> 200</span></a>          return <a class="var it78" onMouseOver="hilite(78)" onMouseOut="lolite()" onClick="logVariable('result')" href="../../../_variables/result.html">$result</a> ?? false;
<a name="l201"><span class="linenum"> 201</span></a>      }
<a name="l202"><span class="linenum"> 202</span></a>  
<a name="l203"><span class="linenum"> 203</span></a>      <span class="comment">/**</span>
<a name="l204"><span class="linenum"> 204</span></a>  <span class="comment">     * 写入文件缓存</span>
<a name="l205"><span class="linenum"> 205</span></a>  <span class="comment">     * @param file 文件路径</span>
<a name="l206"><span class="linenum"> 206</span></a>  <span class="comment">     * @param data 待写入的数据：可以是一个回调函数，只在需要写入时调用</span>
<a name="l207"><span class="linenum"> 207</span></a>  <span class="comment">     * @param export 数据为php代码</span>
<a name="l208"><span class="linenum"> 208</span></a>  <span class="comment">     * @return 写入的数据</span>
<a name="l209"><span class="linenum"> 209</span></a>  <span class="comment">     * 高并发时只有单个进程可以获取到锁，并写入文件；其它进程将等待写入完成后读取该文件数据并返回</span>
<a name="l210"><span class="linenum"> 210</span></a>  <span class="comment">     * 注意：windows 环境下如果同一秒内多次调用，只会写入一次！（不适合对时效要求很高[一秒内]的缓存）</span>
<a name="l211"><span class="linenum"> 211</span></a>  <span class="comment">     */</span>
<a name="l212"><span class="linenum"> 212</span></a>      public static function <a class="function" onClick="logFunction('SetFileCache')" href="../../../_functions/setfilecache.html" onMouseOver="funcPopup(event,'setfilecache')">SetFileCache</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a> = false)
<a name="l213"><span class="linenum"> 213</span></a>      {
<a name="l214"><span class="linenum"> 214</span></a>          return 'WINDOWS' === <a class="constant" onClick="logConstant('ZPHP_OS')" href="../../../_constants/ZPHP_OS.html" onMouseOver="constPopup(event,'ZPHP_OS')">ZPHP_OS</a> ? self::<a class="function" onClick="logFunction('setCacheWindows')" href="../../../_functions/setcachewindows.html" onMouseOver="funcPopup(event,'setcachewindows')">setCacheWindows</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>) : self::<a class="function" onClick="logFunction('setCacheLinux')" href="../../../_functions/setcachelinux.html" onMouseOver="funcPopup(event,'setcachelinux')">setCacheLinux</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>);
<a name="l215"><span class="linenum"> 215</span></a>      }
<a name="l216"><span class="linenum"> 216</span></a>      private static function <a class="function" onClick="logFunction('setCacheWindows')" href="../../../_functions/setcachewindows.html" onMouseOver="funcPopup(event,'setcachewindows')">setCacheWindows</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>)
<a name="l217"><span class="linenum"> 217</span></a>      {
<a name="l218"><span class="linenum"> 218</span></a>          <a class="var it222" onMouseOver="hilite(222)" onMouseOut="lolite()" onClick="logVariable('lock_path')" href="../../../_variables/lock_path.html">$lock_path</a> = <a class="constant" onClick="logConstant('P_CACHE')" href="../../../_constants/P_CACHE.html" onMouseOver="constPopup(event,'P_CACHE')">P_CACHE</a> . 'lock_file/';
<a name="l219"><span class="linenum"> 219</span></a>          <a class="var it223" onMouseOver="hilite(223)" onMouseOut="lolite()" onClick="logVariable('lock_file')" href="../../../_variables/lock_file.html">$lock_file</a> = <a class="var it222" onMouseOver="hilite(222)" onMouseOut="lolite()" onClick="logVariable('lock_path')" href="../../../_variables/lock_path.html">$lock_path</a> . md5(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l220"><span class="linenum"> 220</span></a>          <a class="phpfunction" onClick="logFunction('file_exists')" href="../../../_functions/file_exists.html" onMouseOver="phpfuncPopup(event,'file_exists')">file_exists</a>(<a class="var it222" onMouseOver="hilite(222)" onMouseOut="lolite()" onClick="logVariable('lock_path')" href="../../../_variables/lock_path.html">$lock_path</a>) || <a class="function" onClick="logFunction('MakeDir')" href="../../../_functions/makedir.html" onMouseOver="funcPopup(event,'makedir')">MakeDir</a>(<a class="var it222" onMouseOver="hilite(222)" onMouseOut="lolite()" onClick="logVariable('lock_path')" href="../../../_variables/lock_path.html">$lock_path</a>, 0755, true);
<a name="l221"><span class="linenum"> 221</span></a>          if (!<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a> = fopen(<a class="var it223" onMouseOver="hilite(223)" onMouseOut="lolite()" onClick="logVariable('lock_file')" href="../../../_variables/lock_file.html">$lock_file</a>, 'w')) {
<a name="l222"><span class="linenum"> 222</span></a>              throw new \Exception('file can not write: ' . <a class="var it223" onMouseOver="hilite(223)" onMouseOut="lolite()" onClick="logVariable('lock_file')" href="../../../_variables/lock_file.html">$lock_file</a>);
<a name="l223"><span class="linenum"> 223</span></a>          }
<a name="l224"><span class="linenum"> 224</span></a>          if (<a class="phpfunction" onClick="logFunction('flock')" href="../../../_functions/flock.html" onMouseOver="phpfuncPopup(event,'flock')">flock</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, LOCK_EX)) {
<a name="l225"><span class="linenum"> 225</span></a>              <a class="phpfunction" onClick="logFunction('file_exists')" href="../../../_functions/file_exists.html" onMouseOver="phpfuncPopup(event,'file_exists')">file_exists</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a> = <a class="phpfunction" onClick="logFunction('dirname')" href="../../../_functions/dirname.html" onMouseOver="phpfuncPopup(event,'dirname')">dirname</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>)) || <a class="function" onClick="logFunction('MakeDir')" href="../../../_functions/makedir.html" onMouseOver="funcPopup(event,'makedir')">MakeDir</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a>, 0755, true);
<a name="l226"><span class="linenum"> 226</span></a>              <a class="phpfunction" onClick="logFunction('clearstatcache')" href="../../../_functions/clearstatcache.html" onMouseOver="phpfuncPopup(event,'clearstatcache')">clearstatcache</a>(true, <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l227"><span class="linenum"> 227</span></a>              if (!<a class="phpfunction" onClick="logFunction('is_file')" href="../../../_functions/is_file.html" onMouseOver="phpfuncPopup(event,'is_file')">is_file</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>) || <a class="phpfunction" onClick="logFunction('filemtime')" href="../../../_functions/filemtime.html" onMouseOver="phpfuncPopup(event,'filemtime')">filemtime</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>) &lt; <a class="constant" onClick="logConstant('TIME')" href="../../../_constants/TIME.html" onMouseOver="constPopup(event,'TIME')">TIME</a>) {
<a name="l228"><span class="linenum"> 228</span></a>                  <a class="phpfunction" onClick="logFunction('file_exists')" href="../../../_functions/file_exists.html" onMouseOver="phpfuncPopup(event,'file_exists')">file_exists</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a> = <a class="phpfunction" onClick="logFunction('dirname')" href="../../../_functions/dirname.html" onMouseOver="phpfuncPopup(event,'dirname')">dirname</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>)) || <a class="function" onClick="logFunction('MakeDir')" href="../../../_functions/makedir.html" onMouseOver="funcPopup(event,'makedir')">MakeDir</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a>, 0755, true);
<a name="l229"><span class="linenum"> 229</span></a>                  <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>();
<a name="l230"><span class="linenum"> 230</span></a>                  if (false === <a class="phpfunction" onClick="logFunction('file_put_contents')" href="../../../_functions/file_put_contents.html" onMouseOver="phpfuncPopup(event,'file_put_contents')">file_put_contents</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a> ? &quot;&lt;?php\nreturn &quot; . <a class="phpfunction" onClick="logFunction('var_export')" href="../../../_functions/var_export.html" onMouseOver="phpfuncPopup(event,'var_export')">var_export</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, true) . ';' : <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>), LOCK_EX)) {
<a name="l231"><span class="linenum"> 231</span></a>                      throw new \Exception('file can not write: ' . <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l232"><span class="linenum"> 232</span></a>                  }
<a name="l233"><span class="linenum"> 233</span></a>                  <a class="phpfunction" onClick="logFunction('flock')" href="../../../_functions/flock.html" onMouseOver="phpfuncPopup(event,'flock')">flock</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, LOCK_UN);
<a name="l234"><span class="linenum"> 234</span></a>                  <a class="phpfunction" onClick="logFunction('fclose')" href="../../../_functions/fclose.html" onMouseOver="phpfuncPopup(event,'fclose')">fclose</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>);
<a name="l235"><span class="linenum"> 235</span></a>                  <a class="phpfunction" onClick="logFunction('unlink')" href="../../../_functions/unlink.html" onMouseOver="phpfuncPopup(event,'unlink')">unlink</a>(<a class="var it223" onMouseOver="hilite(223)" onMouseOut="lolite()" onClick="logVariable('lock_file')" href="../../../_variables/lock_file.html">$lock_file</a>);
<a name="l236"><span class="linenum"> 236</span></a>                  return <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>;
<a name="l237"><span class="linenum"> 237</span></a>              }
<a name="l238"><span class="linenum"> 238</span></a>              <a class="phpfunction" onClick="logFunction('flock')" href="../../../_functions/flock.html" onMouseOver="phpfuncPopup(event,'flock')">flock</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, LOCK_UN);
<a name="l239"><span class="linenum"> 239</span></a>          }
<a name="l240"><span class="linenum"> 240</span></a>          <a class="phpfunction" onClick="logFunction('fclose')" href="../../../_functions/fclose.html" onMouseOver="phpfuncPopup(event,'fclose')">fclose</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>);
<a name="l241"><span class="linenum"> 241</span></a>          if (<a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>) {
<a name="l242"><span class="linenum"> 242</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = require <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>;
<a name="l243"><span class="linenum"> 243</span></a>          } else {
<a name="l244"><span class="linenum"> 244</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="function" onClick="logFunction('ReadFileSH')" href="../../../_functions/readfilesh.html" onMouseOver="funcPopup(event,'readfilesh')">ReadFileSH</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l245"><span class="linenum"> 245</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>);
<a name="l246"><span class="linenum"> 246</span></a>          }
<a name="l247"><span class="linenum"> 247</span></a>          return <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>;
<a name="l248"><span class="linenum"> 248</span></a>      }
<a name="l249"><span class="linenum"> 249</span></a>      private static function <a class="function" onClick="logFunction('setCacheLinux')" href="../../../_functions/setcachelinux.html" onMouseOver="funcPopup(event,'setcachelinux')">setCacheLinux</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>)
<a name="l250"><span class="linenum"> 250</span></a>      {
<a name="l251"><span class="linenum"> 251</span></a>          <a class="phpfunction" onClick="logFunction('file_exists')" href="../../../_functions/file_exists.html" onMouseOver="phpfuncPopup(event,'file_exists')">file_exists</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a> = <a class="phpfunction" onClick="logFunction('dirname')" href="../../../_functions/dirname.html" onMouseOver="phpfuncPopup(event,'dirname')">dirname</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>)) || <a class="function" onClick="logFunction('MakeDir')" href="../../../_functions/makedir.html" onMouseOver="funcPopup(event,'makedir')">MakeDir</a>(<a class="var it219" onMouseOver="hilite(219)" onMouseOut="lolite()" onClick="logVariable('dir')" href="../../../_variables/dir.html">$dir</a>, 0755, true);
<a name="l252"><span class="linenum"> 252</span></a>          if (!<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a> = fopen(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>, 'w')) {
<a name="l253"><span class="linenum"> 253</span></a>              throw new \Exception('file can not write: ' . <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l254"><span class="linenum"> 254</span></a>          }
<a name="l255"><span class="linenum"> 255</span></a>          if (<a class="phpfunction" onClick="logFunction('flock')" href="../../../_functions/flock.html" onMouseOver="phpfuncPopup(event,'flock')">flock</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, LOCK_EX | LOCK_NB)) {
<a name="l256"><span class="linenum"> 256</span></a>              <a class="phpfunction" onClick="logFunction('is_callable')" href="../../../_functions/is_callable.html" onMouseOver="phpfuncPopup(event,'is_callable')">is_callable</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>) &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>();
<a name="l257"><span class="linenum"> 257</span></a>              <a class="phpfunction" onClick="logFunction('fwrite')" href="../../../_functions/fwrite.html" onMouseOver="phpfuncPopup(event,'fwrite')">fwrite</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, <a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a> ? &quot;&lt;?php\nreturn &quot; . <a class="phpfunction" onClick="logFunction('var_export')" href="../../../_functions/var_export.html" onMouseOver="phpfuncPopup(event,'var_export')">var_export</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>, true) . ';' : <a class="phpfunction" onClick="logFunction('serialize')" href="../../../_functions/serialize.html" onMouseOver="phpfuncPopup(event,'serialize')">serialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>));
<a name="l258"><span class="linenum"> 258</span></a>              <a class="phpfunction" onClick="logFunction('flock')" href="../../../_functions/flock.html" onMouseOver="phpfuncPopup(event,'flock')">flock</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>, LOCK_UN);
<a name="l259"><span class="linenum"> 259</span></a>              <a class="phpfunction" onClick="logFunction('fclose')" href="../../../_functions/fclose.html" onMouseOver="phpfuncPopup(event,'fclose')">fclose</a>(<a class="var it109" onMouseOver="hilite(109)" onMouseOut="lolite()" onClick="logVariable('h')" href="../../../_variables/h.html">$h</a>);
<a name="l260"><span class="linenum"> 260</span></a>          } elseif (<a class="var it236" onMouseOver="hilite(236)" onMouseOut="lolite()" onClick="logVariable('export')" href="../../../_variables/export.html">$export</a>) {
<a name="l261"><span class="linenum"> 261</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = require <a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>;
<a name="l262"><span class="linenum"> 262</span></a>          } else {
<a name="l263"><span class="linenum"> 263</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="function" onClick="logFunction('ReadFileSH')" href="../../../_functions/readfilesh.html" onMouseOver="funcPopup(event,'readfilesh')">ReadFileSH</a>(<a class="var it123" onMouseOver="hilite(123)" onMouseOut="lolite()" onClick="logVariable('file')" href="../../../_variables/file.html">$file</a>);
<a name="l264"><span class="linenum"> 264</span></a>              <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> &amp;&amp; <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a> = <a class="phpfunction" onClick="logFunction('unserialize')" href="../../../_functions/unserialize.html" onMouseOver="phpfuncPopup(event,'unserialize')">unserialize</a>(<a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>);
<a name="l265"><span class="linenum"> 265</span></a>          }
<a name="l266"><span class="linenum"> 266</span></a>          return <a class="var it73" onMouseOver="hilite(73)" onMouseOut="lolite()" onClick="logVariable('data')" href="../../../_variables/data.html">$data</a>;
<a name="l267"><span class="linenum"> 267</span></a>      }
<a name="l268"><span class="linenum"> 268</span></a>  }
</pre>
</div>
<script language="JavaScript" type="text/javascript">
FUNC_DATA={
'setcachelinux': ['setcachelinux', '', [['core/v0.1/z','cache.class.php',249]], 1],
'delete': ['delete', '', [['core/v0.1/ext','db.class.php',322]], 3],
'redis': ['redis', '', [['core/v0.1/z','cache.class.php',10]], 6],
'mlock': ['mlock', 'memcached锁 ', [['core/v0.1/z','cache.class.php',70]], 1],
'set': ['set', '', [['core/v0.1/ext','verimg.class.php',33],['core/v0.1/ext','upload.class.php',51]], 12],
'setfilecache': ['setfilecache', '写入文件缓存 ', [['core/v0.1/z','cache.class.php',203]], 1],
'readfilesh': ['readfilesh', '', [['core/v0.1','core.php',92]], 5],
'setcachewindows': ['setcachewindows', '', [['core/v0.1/z','cache.class.php',216]], 1],
'makedir': ['makedir', '创建目录 ', [['core/v0.1/ext','upload.class.php',191],['core/v0.1','core.php',129]], 9],
'isfullpath': ['isfullpath', '', [['core/v0.1','core.php',80]], 2],
'r': ['r', 'Redis缓存操作 ', [['core/v0.1/z','cache.class.php',94]], 2],
'add': ['add', '', [['core/v0.1/ext','db.class.php',62]], 4],
'rlock': ['rlock', 'redis锁 ', [['core/v0.1/z','cache.class.php',46]], 1],
'f': ['f', '文件缓存操作 ', [['core/v0.1/z','cache.class.php',162]], 2],
'select': ['select', '', [['core/v0.1/ext','db.class.php',249]], 1],
'm': ['m', 'Memcached缓存操作 ', [['core/v0.1/z','cache.class.php',128]], 2],
'memcached': ['memcached', '', [['core/v0.1/z','cache.class.php',31]], 4],
'filemtime': ['filemtime', '', [], 6],
'file_exists': ['file_exists', '', [], 11],
'usleep': ['usleep', '', [], 2],
'serialize': ['serialize', '', [], 17],
'is_file': ['is_file', '', [], 39],
'unlink': ['unlink', '', [], 2],
'file_put_contents': ['file_put_contents', '', [], 8],
'fclose': ['fclose', '', [], 7],
'dirname': ['dirname', '', [], 6],
'is_callable': ['is_callable', '', [], 9],
'unserialize': ['unserialize', '', [], 7],
'clearstatcache': ['clearstatcache', '', [], 2],
'flock': ['flock', '', [], 12],
'fwrite': ['fwrite', '', [], 2],
'var_export': ['var_export', '', [], 2]};
CLASS_DATA={
'cache': ['cache', '', [['core/v0.1/z','cache.class.php',4]], 13]};
CONST_DATA={
'P_CACHE': ['P_CACHE', '', [['core/v0.1','core.php',31]], 9],
'TIME': ['TIME', '', [['core/v0.1','core.php',18]], 11],
'ZPHP_OS': ['ZPHP_OS', '', [['core/v0.1','core.php',13]], 4],
'P_CACHE_': ['P_CACHE_', '', [['core/v0.1/z','z.class.php',213],['core/v0.1/z','z.class.php',227]], 3]};
</script>
<div id="func-popup" class="funcpopup"><p id="func-title" class="popup-title">title</p><p id="func-desc" class="popup-desc">Description</p><p id="func-body" class="popup-body">Body</p></div>
<div id="class-popup" class="funcpopup"><p id="class-title" class="popup-title">title</p><p id="class-desc" class="popup-desc">Description</p><p id="class-body" class="popup-body">Body</p></div>
<div id="const-popup" class="funcpopup"><p id="const-title" class="popup-title">title</p><p id="const-desc" class="popup-desc">Description</p><p id="const-body" class="popup-body">Body</p></div>
<div id="req-popup" class="funcpopup"><p id="req-title" class="popup-title">title</p><p id="req-body" class="popup-body">Body</p></div>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
	<tr><td>Generated: Thu Sep 10 15:54:52 2020</td>
	<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
	</tr>
</table>
</body></html>
